package com.wissen.new_giskcard.server.impl;

import com.wissen.new_giskard.server.imp.AuthenticateServiceimpl;

import junit.framework.TestCase;

public class AuthenticateTest extends  TestCase {

	private AuthenticateServiceimpl authenticateService;
	
	protected void setUp() throws Exception
	{
		authenticateService=new AuthenticateServiceimpl();
	}
	
	/*
	* Test Case for a true user name and password
	*/
	       
	       public void TestValidUser()
	       {
	               boolean result;
	               
	               result=authenticateService.authenticateUser("sagar","123");
	               assertTrue("return result "+result +" instead of true", result=true);                                
	       }
	  /*
	        * Test Case for a wrong user name
	        */        
	       
	       public void TestWrongUser()
	       {
	               boolean result;
	               
	               result=authenticateService.authenticateUser("swapnil","satana");
	               assertTrue("return result "+result +" instead of true", result=false);                                
	       }
	       
	       /*
	        * Test Case for wrong password
	        */
	       
	       public void TestAuthentication(String userName,String password)
	       {
	               boolean result;
	               
	               result=authenticateService.authenticateUser(userName,password);
	               assertTrue("return result "+result +" instead of true", result=false);                                
	       }
	}


	 
	

